package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.vo.DashboardVO;
import com.cskaoyan.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author rebaogu
 * @description 首页controller
 * @date 2022.04.06 16:22
 * @package com.cskaoyan.controller
 * @Classname IndexController
 */
@RestController
public class IndexController {


    @Autowired
    UserService userService;


    @RequestMapping("admin/dashboard")
    public BaseRespVo dashboard() {
        DashboardVO dashboardVO = userService.dashboard();
        return BaseRespVo.ok(dashboardVO);
    }
}
